home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / SimpleCommon.r < prev    next >
Encoding:
Text File  |  1996-11-19  |  2.8 KB  |  162 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SimpleCommon.r
  3.  
  4.     Contains:    Resource for the SimpleProgram.
  5.  
  6.     Copyright:    © 1991-1994 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10.  
  11. #include "SimpleCommon.h"
  12.  
  13. /* this ALRT and DITL are used as an error screen */
  14. resource 'ALRT' (rUserAlert, purgeable) {
  15.     {40, 20, 150, 260},
  16.     rUserAlert,
  17.     { /* array: 4 elements */
  18.         /* [1] */
  19.         OK, visible, silent,
  20.         /* [2] */
  21.         OK, visible, silent,
  22.         /* [3] */
  23.         OK, visible, silent,
  24.         /* [4] */
  25.         OK, visible, silent
  26.     }
  27. };
  28.  
  29. resource 'DITL' (rUserAlert, purgeable) {
  30.     { /* array DITLarray: 3 elements */
  31.         /* [1] */
  32.         {80, 150, 100, 230},
  33.         Button {
  34.             enabled,
  35.             "OK"
  36.         },
  37.         /* [2] */
  38.         {10, 60, 60, 230},
  39.         StaticText {
  40.             disabled,
  41.             "Error. ^0."
  42.         },
  43.         /* [3] */
  44.         {8, 8, 40, 40},
  45.         Icon {
  46.             disabled,
  47.             2
  48.         }
  49.     }
  50. };
  51.  
  52.  
  53. resource 'STR#' (kInspectorMainErrStrings, purgeable) {
  54.     {
  55.     "Out of Memory!!";
  56.     }
  57. };
  58.  
  59. /* Resources for the SimpleProgram NV routine */
  60.  
  61. /* we use an MBAR resource to conveniently load all the menus */
  62.  
  63. resource 'MBAR' (rMenuBar) {
  64.     { mApple, mFile, mEdit};
  65. };
  66.  
  67. resource 'MENU' (mApple) {
  68.     mApple, textMenuProc,
  69.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  70.     enabled, apple,
  71.     {
  72.         "About Inspector…",
  73.             noicon, nokey, nomark, plain;
  74.         "-",
  75.             noicon, nokey, nomark, plain
  76.     }
  77. };
  78.  
  79. resource 'MENU' (mFile) {
  80.     mFile, textMenuProc,
  81.     0b0000000000000000000000000001000,    /* enable Quit only, program enables others */
  82.     enabled, "File",
  83.     {
  84.         "Load LibraryManager",
  85.             noicon, "L", nomark, plain;
  86.         "Unload LibraryManager",
  87.             noicon, "U", nomark, plain;
  88.         "Goto Real Program",
  89.             noicon, "G", nomark, plain;
  90.         "Quit",
  91.             noicon, "Q", nomark, plain
  92.     }
  93. };
  94.  
  95.  
  96. resource 'MENU' (mEdit) {
  97.     mEdit, textMenuProc,
  98.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  99.     enabled, "Edit",
  100.      {
  101.         "Undo",
  102.             noicon, "Z", nomark, plain;
  103.         "-",
  104.             noicon, nokey, nomark, plain;
  105.         "Cut",
  106.             noicon, "X", nomark, plain;
  107.         "Copy",
  108.             noicon, "C", nomark, plain;
  109.         "Paste",
  110.             noicon, "V", nomark, plain;
  111.         "Clear",
  112.             noicon, nokey, nomark, plain
  113.     }
  114. };
  115.  
  116.  
  117. /* this ALRT and DITL are used as an About screen */
  118.  
  119. resource 'ALRT' (rAboutAlert, purgeable) {
  120.     {40, 20, 160, 330 }, rAboutAlert, {
  121.         OK, visible, silent;
  122.         OK, visible, silent;
  123.         OK, visible, silent;
  124.         OK, visible, silent
  125.     };
  126. };
  127.  
  128. resource 'DITL' (rAboutAlert, purgeable) {
  129.     { /* array DITLarray: 5 elements */
  130.         /* [1] */
  131.         {88, 224, 108, 304},
  132.         Button {
  133.             enabled,
  134.             "OK"
  135.         },
  136.         /* [2] */
  137.         {8, 8, 24, 304 },
  138.         StaticText {
  139.             disabled,
  140.             "LibraryManager Inspector Application"
  141.         },
  142.         /* [3] */
  143.         {32, 8, 48, 237},
  144.         StaticText {
  145.             disabled,
  146.             "Copyright © 1991-1992 Apple Computer"
  147.         },
  148.         /* [4] */
  149.         {56, 8, 72, 136},
  150.         StaticText {
  151.             disabled,
  152.             "Brought to you by:"
  153.         },
  154.         /* [5] */
  155.         {80, 24, 112, 220},
  156.         StaticText {
  157.             disabled,
  158.             "The SLM Team (all 3 of us)"
  159.         }
  160.     }
  161. };
  162.